home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Games Collection 1 / software vault.zip / software vault / CDR02 / DCGAMES1.ZIP / NEWGAME.ZIP / REGULAR.SCR < prev    next >
Text File  |  1992-09-08  |  2KB  |  71 lines

  1. !
  2. ! Default adventurer script..
  3. !
  4. ! (c) DC Software, 1992
  5. !
  6.  
  7. !------------------------------------------------------------------------!
  8. :@TALK ! Talk to the character !
  9. !------------------------------------------------------------------------!
  10.  
  11. ! First, say hello.. !
  12.   if NPC.V0 > 0 then
  13.     writeln( "Hello ", player.name, ". What brings you back?" );
  14.   else
  15.     writeln( "Hello. I am ", npc.name, ". How may I help you?" );
  16.   endif;
  17.  
  18. ! Now, set some variables..
  19.   NPC.V0 = 1; ! From know on, remember we've been here
  20.  
  21. :CHAT
  22.   L3 = getstr("Name","Job","Join","Bye");
  23.   if L3 = -1 goto CSTOP; 
  24.  
  25. ! Handle JOIN differently..
  26.   if L3 = 2 then 
  27.     if npc.level > player.level + 4 then
  28.       writeln( "You are much to inexperienced. Ask me again later!" );
  29.       goto CHAT;
  30.     endif;
  31.     if npc.level < player.level - 6 then
  32.       writeln( "I am much to inexperienced to join you.." );
  33.       goto CHAT;
  34.     endif;
  35.     if group.size = 6 then
  36.       writeln( "Your party is full!" );
  37.       goto CHAT;
  38.     endif;
  39.     if NOT dotext( S0 ) then
  40.       writeln( "Let's get busy!" );
  41.     endif;
  42.     JOIN;
  43.     STOP;
  44.   endif;
  45.  
  46. ! First, see if the keyword typed is in the character's writeln block !
  47.   if dotext( S0 ) goto CHAT;
  48.  
  49. ! It didn't, so try the predefined ones..
  50.   on L3 goto CNAME, CJOB, CHAT, CSTOP;
  51.  
  52. ! Nope, try a 'DEFAULT' line
  53.   if not dotext( "DEFAULT" ) then
  54.     writeln( "I don't know anything about that!" );
  55.   endif;
  56.   goto CHAT;
  57.  
  58. :CNAME
  59.   writeln( "My name is ", NPC.name, "." );
  60.   GOTO CHAT;
  61.  
  62. :CJOB
  63.   writeln( "I am a ", npc.type );
  64.   GOTO CHAT;
  65.  
  66. :CSTOP
  67.   writeln( "Nice talking to you.." );
  68.   STOP;
  69.  
  70. ! Feel free to expand on this list.. !
  71.